{%extends 'layout.html'%}
{%set title="Search Results for '%s'"%q %}
{%block stylesheets%}
{{super()}}
{{css('items/search')}}
{%endblock%}
{%block javascript%}
{{super()}}
{%if current_user%} {{js('items/list')}} {%endif%}
{%endblock%}

{%block content%}
{%from 'items/macros.html' import item with context%}

{%if results|length %}
{%for itm in results%}
{{item(itm)}}
{%endfor%}
{%else%}
No results were found.
{%endif%}

<div id="pagination">
	{%if fewer_pages %}
	<a href="/search?q={{q|urlencode}}&amp;page={{page-1}}">&larr;</a>
	{%endif%}
	{%if more_pages %}
	<a href="/search?q={{q|urlencode}}&amp;page={{page+1}}">&rarr;</a>
	{%endif%}
</div>
{%endblock%}